import { request } from "@/utils";

export const apiGetArticle = function () {
  return request({
    url: "/channels",
    method: "get",
  });
};

export const apiSubmitArticle = function (params) {
  return request({
    url: "/mp/articles?draft=false",
    method: "post",
    data: params,
  });
};

/**
 * 文章详情
 * @param {*} id 
 * @returns 
 */
export const apiArticleDetail = function (id) {
  return request({
    url: `/mp/articles/${id}`,
    method: "get",
  });
};
